using System;
using System.Collections.Generic;
using System.Text;

namespace Spike.ContractBuilder.Host
{
    public class TestCondition
    {
        /// <summary>
        /// Order            -- isNotNull
        ///      .Items[]    -- memberexists & index=-1
        ///      .Items[1]   -- memberexists & index=1
        ///               .Product -- memberexists & index=-1
        ///                       .Name -- memberexists & index=-1
        ///                            ="bla" -- equalTo & index=-1
        /// </summary>
        public enum ComparisionOperator
        {
            isNull, isNotNull, equalTo, greaterThan, lessThan, equalToLessThan, equalToGreaterThan, memberExists, memberMissing
        }

        // a value of -1 indicates that either the index is not significant
        // or the array is empty
        private int _index = -1;

        public int Index
        {
            get { return _index; }
            set { _index = value; }
        }

        private ComparisionOperator _operator = ComparisionOperator.equalTo;

        public ComparisionOperator Operator
        {
            get { return _operator; }
            set { _operator = value; }
        }

        private string _value = string.Empty;

        public string Value
        {
            get { return _value; }
            set { _value = value; }
        }

        private TestCondition _chain;

        public TestCondition Chain
        {
            get { return _chain; }
            set { _chain = value; }
        }
	
	
    }
}
